Skip to content

Conversation

@jaerod95
Copy link
Contributor

Overview

Adds support for passing in a -c, --config <path_to_config> flag into the pull command for specifying where to find the cli config.yml.
Additionally, cleans up the file structure to better match the internal architecture used within the CLI.
Adds support for new outDir field to specify which folder you would like to have the cli output to at the global and per output level.
Finally, supports overriding project/variant configs at the output level.

Test Plan

Testing successfully completed in via:

  • change the name of your config.yml file to something else. Call the pull command passing the flag -c ./relative/path/to/your/renamed/config.yml and ensure it reads the config correctly
  • Specify an outDir property at the project level. it should output the files generated to the relative path provided.
  • Add project filters at the output level and ensure that is respected over the global project configs value. and empty array should still override what is defined globally.

- Introduced a new `--config` flag for the `pull` command to specify the project config file path.
- Updated `initProjectConfig` to accept options for configuration.
- Enhanced `executeCommand` to handle command options more effectively.
- Adjusted output directory handling in JSONFormatter for improved flexibility.
- Added `outDir` to output filters in shared outputs for better configuration management.
- Updated `writeFileSync` and `writeFile` functions to check for the existence of the target directory and create it recursively if it does not exist. This ensures that files can be written without errors related to missing directories.
- Moved framework processor logic to a new `json` directory for better organization.
- Updated `JSONFormatter` to utilize the new `getFrameworkProcessor` function from the JSON framework.
- Removed obsolete base framework and index files, streamlining the framework structure.
- Introduced `BaseFramework` and `I18NextFramework` classes to handle specific framework processing.
- Enhanced output directory handling in `BaseFormatter` for improved configuration management.
- Updated `JSONFormatter` to correctly process the framework output.
- Removed obsolete imports and files related to the i18next framework.
- Simplified framework type handling in the framework processor.
- Enhanced Zod schema for JSON output to directly specify the framework type.
Copy link
Contributor

@marla-hoggard marla-hoggard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is working great except for specifying an outDir property at the top level of the yml file. Project/variant overrides are working nicely from top and per-output specification. outDir works great if provided to a specific output. I can provide different directories for each output. and each directory is being made for me if it didn't exist.

Just can't specific an outDir at the top level of the config file. When I do that, it's being ignored and saving to the default location.

- Simplified the `format` method in `BaseFormatter` and `JSONFormatter` by removing unnecessary parameters.
- Updated output directory handling in `BaseFormatter` and `AppContext` for better consistency and clarity.
- Enhanced the `outDir` retrieval logic in `AppContext` to prioritize project configuration settings.
@jaerod95 jaerod95 requested a review from marla-hoggard April 16, 2025 20:22
@jaerod95 jaerod95 merged commit d797808 into v5-beta Apr 16, 2025
1 check passed
@jaerod95 jaerod95 deleted the jrod/dit-10122-add-support-for-c-flag-for-defining-the-location-of-the branch April 22, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants